package com.minimalist.common.entity.basic.vo.role;

import com.minimalist.common.config.mybatis.bo.PageReq;
import com.minimalist.common.config.swagger.SchemaEnum;
import com.minimalist.common.entity.basic.enums.StatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author 11987
 */
@Schema(name = "角色查询实体")
public class RoleQueryVO extends PageReq implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(name = "roleName", description = "角色名称", type = "string")
    private String roleName;

    @Schema(name = "roleCode", description = "角色编码", type = "string")
    private String roleCode;

    @SchemaEnum(implementation = StatusEnum.class)
    @Schema(name = "status", description = "角色状态", type = "integer")
    private Integer status;

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        RoleQueryVO that = (RoleQueryVO) o;
        return java.util.Objects.equals(roleName, that.roleName) &&
               java.util.Objects.equals(roleCode, that.roleCode) &&
               java.util.Objects.equals(status, that.status);
    }

    @Override
    public int hashCode() {
        return java.util.Objects.hash(super.hashCode(), roleName, roleCode, status);
    }

    @Override
    public String toString() {
        return "RoleQueryVO{" +
               "roleName='" + roleName + '\'' +
               ", roleCode='" + roleCode + '\'' +
               ", status=" + status +
               "} " + super.toString();
    }

}
